Error correction code seeding

ABSTRACT

The technology disclosed herein provides a method of verifying data read from a data block when the cell number of the data block does not match an ECC value stored in the data block. In particular, the method includes accessing a data block in an indexed sequence of data blocks based on a cell number, wherein each data block in the indexed sequence includes a stored ECC value; retrieving an offset associated with the cell number of the data block; generating an ECC value based on the cell number and the offset; and determining whether the generated ECC value and the stored ECC value satisfy an integrity condition.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is related to U.S. patent application Ser. No.______, entitled “Error Correction Code Seeding” and filed concurrentlyherewith, which is specifically incorporated by reference herein for allthat it discloses and teaches.

BACKGROUND

Unusable data blocks are discovered at several stages in driveprocessing. When such data blocks are discovered, the drive may bere-linearized so useable data blocks have sequential indices encoded inError Correction Code (EEC) information on each of the data blocks. As aresult of such re-linearization, the ECC information is rewritten on allusable data blocks so that the usable blocks have sequential indices.However, it can take several hours to re-linearize a single drive atconsiderable expense to the manufacturer.

SUMMARY

Implementations described and claimed herein address the foregoingproblems by accessing a data block in an indexed sequence of data blocksbased on a cell number, wherein each data block in the indexed sequenceincludes a stored ECC value; retrieving an offset associated with thecell number of the data block; generating an ECC value based on the cellnumber and the offset; and determining whether the generated ECC valueand the stored ECC value satisfy an integrity condition.

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter. These andvarious other features and advantages will be apparent from a reading ofthe following Detailed Description.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a system having a mechanism for verifying data readfrom a data block when a cell number of the data block does not match anerror correction code (ECC) value stored in the data block.

FIG. 2 illustrates a storage device having an offset table creationmodule that creates an offset table that can be used to calculate a seedvalue for an error detection module.

FIG. 3 illustrates another system having a mechanism for verifying dataread from a data block when the cell number of the data block does notmatch an ECC value stored in the data block.

FIG. 4 illustrates example operations for creating an offset table thatcan be used to calculate a seed value for an error detection module.

FIG. 5 illustrates example operations for verifying data read from adata block when the cell number of the data block does not match an ECCvalue stored in the data block.

FIG. 6 discloses a block diagram of a computer system suitable forimplementing one or more aspects of a system for selective omission ofone or more data blocks in an indexed sequence of target data blocksduring a disc accessing operation.

DETAILED DESCRIPTION

FIG. 1 illustrates a system 100 having a mechanism (e.g., an offsetlookup module 114) for verifying data of a data block when the cellnumber of the data block does not match an error correction code (ECC)value stored in the data block. The system 100 includes a host computer102 that sends one or more access commands 104 (e.g., read or writecommands) to a storage drive 106. The storage drive 106 is a devicehaving a tangible computer-readable storage media, which can store datain sequential units (e.g., cells or data blocks) that are accessible bya computer. Such tangible computer-readable media may include withoutlimitation magnetic storage disks, solid state drives, flash memory,optical storage disks, random access memories (RAMs), read only memories(ROMS), and the like. The storage drive 106 includes a number of datablocks (e.g., a data block 108), which can hold a set number of storagebytes.

Each of the data blocks has a physical index (e.g., a physical index 0in data block 108) associated with the data block's physical position inthe indexed sequence of data blocks on the storage device 106. Accordingto one implementation, sequential data blocks on the storage drive 106are associated with consecutively increasing physical indices. Each ofthe data blocks also includes error correction code (ECC) information(not shown), including an ECC value that encodes the physical index ofthe data block.

Storage devices (e.g., the storage drive 106) may include a number ofdata blocks identified as bad or unusable during initial processing ofthe device. For example, block defects or irregularities (e.g., thermalasperities) on the surface of a disc may make one or more blocks of thedisc unusable. Data blocks without actual physical defects may also be“unusable” because they are, for other reasons, selectively omitted froma storage device's data storage operations. Thus, the term “unusable” isused herein to denote a storage block that is for any reason selectivelyomitted from use in data storage operations.

When data is read back from a data block on the storage drive 106, theerror detection and correction module 110 performs a data integritycheck to ensure that the data read or written is correct and that thecorrect data block was accessed. To perform this integrity check, theerror detection and correction module 110 uses a seed value and dataread back from the data block to generate an ECC value. When theintegrity check is successful, the ECC value generated matches the ECCvalue stored in the data block. However, such confirmation is generallynot possible if the seed value does not match the physical index of thedata block.

In FIG. 1, data blocks with physical indices 1 and 4 are identified asunusable during an initial factory processing operation. However, thestorage drive 106 need not be re-linearized to exclude the unusableblocks 1 and 4 from the storage device's indexing scheme. Rather, thesystem 100 has been manufactured to include an offset lookup module 114,which may be a functional module in firmware. The offset lookup module114 allows the error detection and correction module 110 to verify theintegrity of data read from a data block even when the seed value inputto the error detection and correction module 110 differs from thephysical index of the data block.

In the example illustrated, the host computer 102 sends four accesscommands 104 to write four names (e.g., Sarah, Jake, June, and Charlie)to four target data blocks with cell numbers 0-3. Data (e.g., the name)associated with each of the four target data blocks is sent to thestorage drive 106, along with a logical block address (LBA)corresponding to each of the data blocks. The storage device 100converts the LBAs from the host computer 102 to cell numbers 0, 1, 2,and 3, respectively. Thereafter, a data allocation module (not shown)selects a physical block index to correspond to each of the cellnumbers. To avoid writing data to the unusable blocks with physicalindices 1 and 4, the data allocation module determines that the dataassociated with the cell numbers 0, 1, 2, and 3, can be allocated tophysical data blocks 0, 2, 3, and 5, respectively. Consequently, thenames Sarah, Jake, June, and Charlie are written to the physical datablocks 0, 2, 3, and 5.

When data is read back from one of the four target data blocks, theoffset lookup module 114 calculates a seed value that can be used by theerror detection and correction module 110 to verify the integrity of thedata read from the target data block. In particular, the offset lookupmodule 114 accesses an offset table (not shown) and retrieves an offsetassociated with the cell number of the target data block. Using the cellnumber and the offset, the offset lookup module generates a seed value.The error detection and correction module 110 uses the seed value anddata read back from the associated data block to calculate an ECC value,which is compared to the ECC value stored in the target data block.

For example, to verify the integrity of the data “Sarah,” the offsetlookup module 114 retrieves an offset of 0 associated with the cellnumber 0. Using the offset of 0, the offset lookup module 114 calculatesa seed value of 0, which is used to calculate an ECC value that matchesthe ECC value stored in the data block having the physical index of 0.

Likewise, to verify the integrity of the data “Jake,” the offset lookupmodule 114 uses the cell value of 1 to retrieve an offset of 1 and tocalculate a seed value of 2. The error detection and correction module110 uses the seed of 2 to calculate an ECC value that matches an ECCvalue stored that in the data block having the physical index of 2.

Similarly, to verify the integrity of the data “Charlie,” the offsetlookup module 110 retrieves an offset of 2 associated with the cellnumber of 3 and calculates a seed value of 5. The error detection andcorrection module 110 uses the seed value of 5 and data read back fromthe data block having the physical index 5 to calculate an ECC valuethat matches the ECC value stored in the data block with the physicalindex of 5. Consequently, data is written to sequential usable datablocks on the media, the integrity of the data is verified, and thedrive is not re-linearized during initial drive processing.

FIG. 2 illustrates a storage device 200 having an offset table creationmodule 202 that creates an offset table 204 that can be used tocalculate a seed value for an error detection module (not shown), andthus verify the integrity of data read from a data block. The storagedevice 200 includes a storage media 206 that has a number of data blocks(e.g., data blocks 208 and 210) capable of storing a set amount of data.The storage media 206 may be any type of tangible computer-readablemedia; however, in one implementation, the storage media is a magneticdisc and the data blocks are sequential sectors along a data track onthe disc. In another implementation, the storage media is a solid statedrive (SSD).

Each of the data blocks on the storage media 206 has a physical index(e.g., a physical index 0 in data block 210) associated with the datablock's physical position in an indexed sequence (e.g., a sequenceincluding both usable and unusable data blocks on the storage media206). Additionally, each of the data blocks has encoded EEC informationthat encodes the physical index of the data block (e.g., the encodedphysical index “ECC 0” in data block 210). During a factory formattingoperation, which may be after the ECC information is encoded on each ofthe data blocks, unusable data blocks (e.g., unusable data blocks withphysical indices 1 and 4) are identified on the storage media 206 by anerror detection module (not shown).

A mechanism for error checking data blocks in a sequence thatselectively omits unusable blocks from storage operations is implementedvia an offset table creation module 202. The offset table creationmodule 202 associates the physical indices of the usable data blockswith corresponding cell numbers (where the cell numbers collectivelyrepresent the unbroken sequence of usable data blocks) and records in anoffset table 204 incremental offset values in association with selectcell numbers. Such offset values may subsequently be used to check theintegrity of data written and read during disk storage operations.

FIG. 2 also includes a logical table 214 (which may or may not beincluded in memory) exemplifying logic used to derive the offsets of theoffset table 204. In particular, the logical table 214 has a “PhysicalIndex” column that includes physical indices corresponding to both theusable and the unusable data blocks on the storage media 206. Thelogical table 214 also has a “Cell Number” column that includes a cellnumber in association with each usable data block. For example, thephysical indices 1 and 4 do not have a corresponding cell number in theoffset table 204 because such data blocks have been identified asunusable by the error detection module. Thus, the set of consecutivecell numbers 0, 1, 2, and 3 correspond to the physical indices ofsequential, usable data blocks 0, 2, 3, and 5, respectively. An offset(e.g., a total offset value in the logic table 214) represents thedifference between the physical index and the cell number of a datablock. The total offset value increments by 1 in association with eachusable data block following an unusable data block in the indexedsequence. For example, the total offset value increments by 1 inassociation with the physical index 2 because the physical index 2corresponds to the next usable data block following the unusable datablock with physical index 1. Similarly, the total offset againincrements by 1 in association with the physical index 5, because thephysical index 5 corresponds to the next usable data block following theunusable data block with physical index 4. The information illustratedin the logic table 214 is condensed into the offset table 204 and storedin memory of the storage device 200 by the offset table creation module202.

The offset table creation module 202 does not record in the offset table204 an offset associated with every usable physical index on the storagedevice. Rather, an offset is recorded in association with each usabledata block having a first sequential physical index affected by theincrement (e.g., the first usable data block following an unusable datablock in the indexed sequence of physical indices). For example, thecell numbers 1 and 2 are both affected by an offset of 1. However, thephysical index 2 is the first physical index affected by the offsetof 1. Therefore, the offset of 1 is recorded in association with thephysical index of 2.

The offset table creation module 202 is illustrated as internal to thestorage device 200 (e.g., a module in firmware); however, the offsettable creation module 202 and/or the logical map module 202 may besoftware or firmware of an external device communicatively coupled tothe storage device 200. The offset table 204 created by the offset tablecreation module 202 is saved in association with the storage device 200,such as in firmware of the storage device 200, so that it may beaccessed throughout the lifetime of the storage device 200. Inparticular, the offset table 204 may be accessed each time data is readfrom a data block, and used to calculate a seed value for an errordetection and correction module that verifies the integrity of the datastored in the data block.

FIG. 3 illustrates another system 300 having a mechanism (e.g., anoffset lookup module 310) for verifying data read from a data block whenthe cell number of the data block does not match an ECC value stored inthe data block. The system includes a host computer (not shown) thatsends one or more access commands 304 (e.g., read and write commands) toa storage device 306. The storage device 306 also includes an offsetlookup module 320, an offset table 322, and a storage media 312. Thestorage media 312 includes a number of data blocks (e.g., a data block308) for storing data. Each of the data blocks has a physical index(e.g., a physical index 0 in data block 308) associated with the datablock's physical position in an indexed sequence of data blocks on thestorage media 312. Additionally, each of the data blocks contains EECinformation that encodes the physical index of the data block. Forexample, the data block 308 has an ECC value ‘ECC 0’ that encodes thephysical index “0” of the data block.

During a factory processing operation of the storage device 306,unusable data blocks (e.g., unusable data blocks 314 and 318) areidentified. An offset table creation module (not shown), which may bethe same or similar as the offset table creation module described withrespect to FIG. 2, creates an offset table 322. The offset table 322includes a first column titled “Cell Number.” Here, the cell numbersequence represents the unbroken sequence of usable blocks. Only selectcell numbers are listed in the offset table 322. The offset table 322also includes a column titled “Total Offset” which includes an offsetthat can be used to convert a given cell number to a value that may bepassed as a seed to the error detection and correction module 310.

In FIG. 3, the host computer sends an access command 304 to write fourname four names (e.g., Sarah, Jake, June, and Charlie) to four targetdata blocks associated with the cell numbers 0, 1, 2, and 3. Inparticular, the host sends LBAs to the storage device 306, and thestorage device converts the LBAs into the associated cell numbers 0-3.Using existing techniques, the storage device determines that the dataassociated with the cell numbers 0-3 may be written to physical indices0, 2, 3, and 5, respectively.

When data is subsequently read back from one of the target data blocks,the offset lookup module 320 of the storage device 306 accesses theoffset table 322 and retrieves an offset associated with each cellnumber. In the example illustrated, the offset lookup module 320retrieves an offset of 0 associated with cell number 0; an offset of 1associated with the cell numbers 1 and 2; and an offset of 2 associatedwith the cell number 3. By adding the cell number of each target datablock to the associated offset, the offset lookup module 310 calculatesa seed value (for each target data block) that is input to the errordetection and correction module 310. The error detection and correctionmodule 310 uses the seed value to verify the integrity of data stored inthe target data block. Consequently, the error detection and correctionmodule 310 can detect and correct errors in the data by calculating anECC value and comparing it to an ECC value stored in the target datablock. If the calculated ECC value and the stored ECC value satisfy anintegrity condition (e.g., if the values match or satisfy some othercorrelation), then the integrity of the data written to the target datablock is verified.

For example, to ensure that the name “Jake” is written correctly and tothe correct data block, the physical index 2 (calculated by addingtogether the associated cell number and offset from the offset table322) is input to the error detection and correction module 310 alongwith the data written to the cell with the physical index 2 (e.g.,“Jake”). Using these inputs, the error detection and correction module310 calculates an ECC value (e.g., ECC 2), which matches the ECC valuestored on the data block with the physical index 2 (e.g., ECC 2).

Both the error detection and correction module 310 and the offset lookupmodule 320 are illustrated as internal to the storage device 306 (e.g.,firmware). However, either of both of the modules may also be softwareor firmware of an external device communicatively coupled to the storagedevice 300.

FIG. 4 illustrates example operations for creating an offset table thatcan be used to calculate a seed value for an error detection module. Adesignation operation 405 designates as unusable a data block in anindexed sequence, wherein each data block is associated with a physicalindex. The indexed sequence is a sequence including both usable andunusable data blocks on a storage device. In one implementation,sequential data blocks on a storage device are assigned consecutivelyincreasing physical indices in the indexed sequence. An associationoperation 410 associates a cell number with a subsequent usable datablock following the identified data block in the indexed sequence. Arecording operation 415 records in an offset table an offset inassociation with the cell number of the subsequent usable data block,wherein the offset is used to generate an ECC value of the subsequentusable data block. In one implementation, the offset is added to theassociated cell number to create a seed value for an error detection andcorrection module that calculates the ECC value. The calculated ECCvalue and an ECC value encoded on the subsequent usable data blocksatisfy an integrity condition ensuring the integrity of data written tothe subsequent usable data block.

In one implementation, the offset recorded is a delta between the cellnumber and the physical index of the subsequent usable data block Theoffset may be recorded in the offset table in association with a firstdata block in the indexed sequence affected by the offset. In oneimplementation, the data blocks in the indexed sequence are consecutivesectors along a data track on a magnetic disc.

In one implementation, the example operations 400 are performed duringan initial factory formatting of a storage device. The operations405-415 may be repeated multiple times at the factory, and offsets maybe recorded in relation to each of a number of selectively omitted(i.e., unusable) data blocks on the disc.

FIG. 5 illustrates example operations 500 for verifying data read from adata block when the cell number of the data block does not match an ECCvalue stored in the data block. An accessing operation 505 accesses adata block having an indexed sequence of data blocks based on a cellnumber, wherein each data block in the indexed sequence includes astored ECC value. In one implementation, the indexed sequence of datablocks is a sequence of consecutive data blocks in a storage device. Inanother implementation, the data blocks are sectors along a data trackin a magnetic media disc.

A retrieving operation 510 retrieves an offset associated with the cellnumber of the data block. In one implementation, the retrievingoperation 510 retrieves the offset by accessing an offset access table,which may be stored in the firmware of the storage device.

A generation operation 515 generates an ECC value based on the cellnumber and the offset retrieved. In one implementation, the determiningoperation 515 generates the ECC value by seeding an error detection andcorrection module with the sum of the cell number and the offset.

A determination operation 520 determines whether the generated ECC valueand the stored ECC value satisfy an integrity condition. In oneimplementation, the integrity condition is satisfied if the generatedECC value and the encoded ECC value are equal.

FIG. 6 discloses a block diagram of a computer system 600 suitable forimplementing one or more aspects of a system for selective omission ofone or more data blocks in an indexed sequence of target data blocksduring a disc accessing operation. In one implementation, the computersystem 600 is communicatively coupled to a storage device having anoffset table creation module, an error detection and correction module,and/or an offset lookup module that retrieves an offset to calculate aseed associated with a data block for an error detection and correctionoperation.

The computer system 600 is capable of executing a computer programproduct embodied in a tangible computer-readable storage medium toexecute a computer process. The tangible computer-readable storagemedium is not embodied in a carrier-wave or other signal. Data andprogram files may be input to the computer system 600, which reads thefiles and executes the programs therein using one or more processors.Some of the elements of a computer system are shown in FIG. 6, wherein aprocessor 602 is shown having an input/output (I/O) section 604, aCentral Processing Unit (CPU) 606, and a memory section 608. There maybe one or more processors 602, such that the processor 602 of thecomputing system 600 comprises a single central-processing unit 606, ora plurality of processing units. The computing system 600 may be aconventional computer, a distributed computer, or any other type ofcomputer. The described technology is optionally implemented in softwareloaded in memory 608, a disc storage unit 612, or removable memory 618.

In an example implementation, the error detection and correction module,offset lookup module and/or offset table creation module may be embodiedby instructions stored in memory 608 and/or the storage unit 612 andexecuted by the processor 607. Further, local computing system, remotedata sources and/or services, and other associated logic representfirmware, hardware, and/or software which may be configured toadaptively distribute workload tasks to improve system performance. Theerror detection and correction module, offset lookup module, and/oroffset table creation module may be implemented using a general purposecomputer and specialized software (such as a server executing servicesoftware), and a special purpose computing system and specializedsoftware (such as a mobile device or network appliance executing servicesoftware), or other computing configurations. In addition, program data,such the offset table may be stored in the memory 608 and/or the storageunit 612 and executed by the processor 602.

The implementations of the invention described herein are implemented aslogical steps in one or more computer systems. The logical operations ofthe present invention are implemented (1) as a sequence ofprocessor-implemented steps executing in one or more computer systemsand (2) as interconnected machine or circuit modules within one or morecomputer systems. The implementation is a matter of choice, dependent onthe performance requirements of the computer system implementing theinvention. Accordingly, the logical operations making up the embodimentsof the invention described herein are referred to variously asoperations, steps, objects, or modules. Furthermore, it should beunderstood that logical operations may be performed in any order, addingand omitting as desired, unless explicitly claimed otherwise or aspecific order is inherently necessitated by the claim language.

The above specification, examples, and data provide a completedescription of the structure and use of exemplary implementations of theinvention. Since many implementations of the invention can be madewithout departing from the spirit and scope of the invention, theinvention resides in the claims hereinafter appended. Furthermore,structural features of the different implementations may be combined inyet another implementations without departing from the recited claims.

What is claimed is:
 1. A method comprising: accessing a data block in anindexed sequence of data blocks based on a cell number, wherein eachdata block in the indexed sequence includes a stored ECC value;retrieving an offset associated with the cell number of the data block;generating a ECC value based on the cell number and the offset; anddetermining whether the generated ECC value and the stored ECC valuesatisfy an integrity condition.
 2. The method of claim 1, furthercomprising: seeding an error detection and correction module with avalue based on the cell number and the offset.
 3. The method of claim 2,wherein seeding the error detection and correction module furthercomprises: seeding the error detection and correction module with avalue that is the sum of the cell number and the offset.
 4. The methodof claim 1, wherein the offset is retrieved from an offset table storedin firmware of a storage device.
 5. The method of claim 4, wherein theoffset table is created during a factory formatting operation.
 6. Themethod of claim 1, wherein the indexed sequence of data blocks areconsecutive sectors along a data track on a magnetic disc.
 7. The methodof claim 1, wherein the indexed sequence includes consecutivelyincreasing indices associated with sequential data blocks on a storagedevice.
 8. One or more tangible computer-readable storage media encodingcomputer-executable instructions for executing on a computer system acomputer process, the computer process comprising: accessing a datablock in an indexed sequence of data blocks based on a cell number,wherein each data block in the indexed sequence includes a stored ECCvalue; retrieving an offset associated with the cell number of the datablock; generating an ECC value based on the cell number and the offset;and determining whether the generated ECC value and the stored ECC valuesatisfy an integrity condition.
 9. The one or more tangiblecomputer-readable storage media of claim 8, wherein the computer processfurther comprises: seeding an error detection and correction module witha value based on the cell number and the offset.
 10. The one or moretangible computer-readable storage media of claim 8, wherein the offsetis retrieved from an offset table stored in firmware of a storagedevice.
 11. The one or more tangible computer-readable storage media ofclaim 8, wherein the offset table is created during a factory formattingoperation.
 12. The one or more tangible computer-readable storage mediaof claim 8, wherein the indexed sequence of data blocks are consecutivesectors along a data track on a magnetic disc.
 13. The one or moretangible computer-readable storage media of claim 8, wherein the indexedsequence includes consecutively increasing indices associated withsequential data blocks on a storage device.
 14. A system comprising: astorage device; an offset lookup module configured to retrieve an offsetassociated with a cell number of a data block in an indexed sequence,wherein each data block in the indexed sequence includes a stored ECCvalue; an error detection and correction module configured to: generatean ECC value based on the cell number and the offset; and determinewhether the generated ECC value and the stored ECC value satisfy anintegrity condition.
 15. The system of claim 15, wherein the errordetection and correction module is further configured to generate theECC value by using a seed that is the sum of the cell number and theoffset.
 16. The system of claim 15, wherein the offset lookup module isconfigured to retrieve the offset from an offset table stored infirmware of a storage device.
 17. The system of claim 15 wherein theoffset table is created during a factory formatting operation.
 18. Thesystem of claim 15, wherein the indexed sequence of data blocks areconsecutive sectors along a data track on a magnetic disc.
 19. Thesystem of claim 15, wherein the indexed sequence includes consecutivelyincreasing indices associated with sequential data blocks on a storagedevice.
 20. The system of claim 15, wherein the error detection andcorrection module determines that the integrity condition is satisfiedwhen the generated ECC value equals the stored ECC value.